
<meta charset="utf-8">
<div class="box" id="biz_pmpProject_detail_task_conatainer">
	<div class="box-header with-border">
		<form id="pmpProjectTaskSearchForm" role="form" class="form-inline">
			<div class="form-group">
				<label>任务名称</label> 
				<input name="name" v-model="searchForm.name" type="text" placeholder="" class="form-control">
			</div>
			<div class="form-group">
                  <label for="title">任务责任人</label>
                  	<input name="name" v-model="searchForm.name" type="text" placeholder="" class="form-control">
                </div>
			<button type="button" class="btn btn-info pull-right m-t-n-xs" v-on:click="search">
				<strong>查询</strong>
			</button>
		</form>
	</div>
	<div class="box-body">
				<div class="btn-group " id="pmpProjectTaskTableToolbar" role="group">
				
				</div>
				<table id="pmpProjectTaskBootstrapTable" data-mobile-responsive="true"></table>
	</div>
</div>
<script>
    
new Vue({  
	  el: '#biz_pmpProject_detail_task_conatainer',
	  data:{
		  searchForm:{
			  name: null,
			  pmUserId: null
		 },
		  bus:new Vue(),
	  },
	  mounted:function(){
		  var _this=this;
		//_this.initTable();
	  },
    methods: {
  	  initTable:function(){
  		var _this=this;
  		  var columns=[
  					{checkbox:true,width:20},
  					{field:'name',title:'项目名称',width:160},
  					{field:'version_name',title:'项目版本',width:60},
                    {field:'pm_user_name',title:'负责人',width:60},
					{field:'member_count',title:'项目组成员数',width:100},
					{field:'createTime',title:'创建时间',width:100},
					{field:'status',title:'当前状态',width:100,formatter:_this.formatStatus},
					{field:'status',title:'当前状态',width:60,formatter:_this.formatEntry}]; 
  		  var url="/pmp/service/ma/pmpProject/loadPmpProjectDataSet";
    		zfesBstable.laodTable($("#pmpProjectTaskBootstrapTable"),$("#pmpProjectTaskSearchForm"),$("#pmpProjectTaskTableToolbar"),url,columns,this.searchForm);
  	  },
  	  search:function(){
  		  zfesBstable.reload($("#pmpProjectTaskBootstrapTable")); 
  	  },
  	  refresh:function(){
  		  zfesBstable.refresh($("#pmpProjectTaskBootstrapTable"));
  	  },
  	  add:function(){
  		  var　_this=this;
  		 var url="/views/pmpProject/pmpProject.add.html";
  		 zfesLayerEditDg.open(url,{},"创建项目",460,function(){_this.refresh();});
  		 
  	  },
  	  edit:function(){
  		  if(zfesBstable.isOneRow($("#pmpProjectTaskBootstrapTable"))){
  			  var　_this=this;
  			  var id=zfesBstable.getRowId($("#pmpProjectTaskBootstrapTable"));
  			  var url="/views/pmpProject/pmpProject.edit.html";
  			  zfesLayerEditDg.open(url,{"id":id},"项目信息编辑",460,function(){_this.refresh();}); 
  		 }
  	  },
  	  deletex: function(){
  			if(zfesBstable.isSelectedRow($("#pmpProjectTaskBootstrapTable"))){
  				  var　_this=this;
  				    var id=zfesBstable.getRowId($("#pmpProjectTaskBootstrapTable"));
  					 alertSwal.confirm("删除","是否删除该项目",function(){
  						    var ajaxUrl = "/pmp/service/ma/pmpProject/setPmpProjectStatus";
  							zfesAjax.ajaxTodo(ajaxUrl, { "id" : id,"status":-1}, function(data) {
  								alertSwal.successText(data.message);
  								_this.refresh();
  							}); 
  				});
  			}
  				
  	  }
   }
});


</script>


